added validation for unique tags