. refactor uniqueness validator