sorting with a select (step 4)