Adding routine to find the sum of the elements in each bin of a histogram.