looping through streams