move erase out of writing the tag