added functionality to plot_setup