removing unused isUnique code