getting near the json rpc implementation