switch long polling to websocket