replaced exists check with getCategoryData