change to c++ version