add checkDuplicate method