make setting of tags smarter