added tagging function to categories