some refactor on cpp2c