add main to plot.fittedloop