change rpc from python to C++