implement some rpc methods