modified doPlots