adding the tag writing part to the application