added row sorting