reworked how stream is loaded