resolved recursion error