standalone script for histograms