add some validation functions