finished 1/2 of recursion section