Renamed sort function for clarity