porting to rpcserver