channged graph1 and graph2