Removed unnecessary recursion