create function for a tag