change rpc support from python to C++