moved stream creation to callback