added validations in the model