rewritten to fix a problem watching the stream