Added reverse sort functionality