added unique
refactoring test