add streaming example function