Reordering the output