add to-category function