finished implemented communication with C++