added validations to model