changed find_dist_vs_core to make a histogram