implemented basic model validations