public ShapeObject isContains(Ellipse2D mouse_target){

		int index = 0 ;

		for(ShapeObject temp : objects){

			double width=Math.abs(temp.starting_point.x - temp.ending_point.x);

			// checks for intersection 
			if(mouse_target.intersects(temp.starting_point.x, temp.starting_point.y,width,width)==true){

				if(temp instanceof Line){
					objects.get(index).setVisible(false);
					return new Line(temp.starting_point,temp.ending_point,temp.c);
				}
				else if (temp instanceof Square){
					objects.get(index).setVisible(false);
					return new Square(temp.starting_point,temp.ending_point,temp.c,fill);
				}
				else if (temp instanceof Circle){
					objects.get(index).setVisible(false);
					return new Circle(temp.starting_point,temp.ending_point,temp.c,fill);
				}
			}
			index++;
		}//for
		return null;
	}