updated to comply with recent streaming refactorings