Add a function in rpc-handler