started recursion homework

todo: finish problem 5