Making Rpc more flexible