add rpc fuctions