move this method to the RpcManager