make cp_result independent from input_val_types