add validation functions