public void unDo(Graphics2D g2){

		// Loop through the list of shapes and draw them on the screen
		for (int i = 0; i <draw_index-1 ; i++) {
			ShapeObject temp=objects.get(i);

			if(temp instanceof Line){
				current_start=temp.starting_point;
				current_end=temp.ending_point;
				c=temp.c;
				shape_type="Line";
			}

			else if(temp instanceof Square){
				current_start=temp.starting_point;
				current_end=temp.ending_point;
				c=temp.c;
				Square t=(Square)temp;
				fill=t.fill;
				shape_type="Square";
			}

			else if(temp instanceof Circle){
				current_start=temp.starting_point;
				current_end=temp.ending_point;
				c=temp.c;
				Circle t=(Circle)temp;
				fill=t.fill;
				shape_type="Circle";
			}
			draw(g2);
		}

		// this is for refresing purposes 
		if(draw_index==1){
			current_start=new Point(0,0);
			current_end=new Point(0,0);
			draw(g2);
		}

		draw_index--;
		update();
	}