cleaned up getCategories