switch from polling to web socket