added utils for histogram generation to be used in calculating the ideal number of histogram bins