Added ability to sort partitions