finish the category and label operation