changed hasNoDuplicate to hasDuplicate