added some model validations