rewrite the tags