big update of the code, histograms and unfolding