refactored result_codes and result_code_messages