now with added recursion