added more sort functionality