moved connection to websocket