sorting/reordering are now in separate fns