lots of histogram-related changes