Update thanks to c++ code