Reordering nodes