first version of histogram