writing validations