Sorting tables done