add rpc implementation