sort node list with merge sorting