add K-consecutive object solution