try to write a AssignEndPointsToCategories script