added simple validation functions