finished recursion exercises