removed function call recursion