converted all_categories from hash to sorted array