get categoryId function - 0.2