Adding RPC code