how to design a pattern Tag