finished Recursion assignment