Sort the table