Added uniqueness check functionality