Removed max depth recursion