refactor unique method
finish refactoring of unique method