Added support for sorting rows