working with two streams