Tag class implementation