modify histogram.cpp