fixed recursion method to find and insert node