sort categories and bundles