tag exist code write