with decoding and encoding RPC and exceptions