finished the recursive stuff