rework of histogram pointer structure of the whole program