Added getCategories method