add rpc fuction