move code that adds tag