Added RPC functionality