add validation to check duplicate data