added JSONRPC handling