sorting list of packages