add support and test for recursion