adding capture.plots.R