Added RPC code