first check if they are not already ordered before sorting