Feature/zen 15513

notice that buckets[idx] takes the last value destined for that bucket instead of 'AVERAGE'.