Reordering and labeling