added preliminary websocket support