refactored for uniq list of tags