use fold right for streaming