adding a state variable to the websocket struct
updating branch