got recursion working