all C++ code