changes JS for stream: