sort packages