removed recursion
removed recursion