implement tag auxiliary functions