changed the place where the twwet is sent to websocket server