uniqueness validation optimised