added validations to the models