fitting and read_histogram