almost done changeing to jsonrpc; still untested