C++ code for test only