fix for last commit + better findNodeToInsert (less iterations)