implements _tagReplace