Histogram code and results