better unique handling for tag