starting C++ implementation