improve template for Rpc