updated to check multiple streams