adding code for plot2-plot4
adding code for plot2-plot4