possibly improve tag generation