fixing histogram: work in progress