sort the list of positions