left recursion completed.
previous one was not working correctly