I resolved this after a bit of trial and error, I needed to rename the file with the same name as the name of the function. This could be a problem if a file has different functions, so one has to document it to start with and to attempt to provide a solution based on the concept of
object orientation where a class would have properties and methods.
I wish there was some easier way of writing out my algorithms, sifting through the list of packages seems time consuming already.