model validations and tests