Lots of errors and bug fixes with function testing, see history for details, not sure if what I did was hacky, techincally it has a return statment, but now I can't tell if it's on the right level...