changed p1,p2,image1,image2