implement hashing for tag names