updated make.plots code