removed recursion