add validation for  model