now using ws instead of websocket library