switch to C++