added solution for plot1