adapt the sort functionality for specific values