initial websocket implementation