changed order of plots/functions