selection sort reordered