updated functions to successfully pass complex level1 tests
removed unnecessary whitespace