modification for multiple streams