add test about each string is uniq
refactoring