add power histograms, fix bugs