better handing of tags