added recurse helper