Added validation functions