swapping stream for websockets