Buggy version of median filter with dynamic counts of streams