Adding checkDuplicate