removed all but websocket logic