modified plot.p