how does this work? what about the case when streak was just initialized, and streak.length is 0?