move nodes from nodelist to children; change sql to get level for
parents