Added functionality to fit_peaks()