add rpc support