split RPC into two modules