made the tag-class more generic