using histograms
more testing