added updateCategories method