Pack sorting added