better testing of tag handling, simplified the implementation of tags