validation and response codes