update websocket for 2 way communication