Think through iterators for histogram.
You should do swap too.