adding test for recursion bug
refactoring so that parse is not called within a parse