#188 refactor duplicateCheck