recursion. hard question