begin rework on connection with C++ server