add recursion. only need to test now