inlining streaming until the gem can be refactored