methods and recursion homework