basic websocket functionality