dumpHistogram code