functions to zip two streams together