fix algorithm for streaks