resort the data