sorting rows in the ui