better stream detection