tmp
transformation from c to c++