fit_templates.C added