Added function for joining streams in sequence