Second implementation, recursion