Added subcategories functionality