added a simple json-rpc impl