updated reset function to update the tag