added .func attribute to fitls result
improved rebin