simple sort functionality done