changed RPC engine so it encodes and decodes outgoing calls