debugged some of splitNodeHelper