added function checkDuplicateRecord