public void doSearch(int xBottomLeft, int yBottomLeft, int xTopRight, int yTopRight){
		int xChecks = xTopRight - xBottomLeft -1;
		int yChecks = yTopRight - yBottomLeft -1;
		robot.rotate(90);
		tll.goToNextLine();
		xChecks --;
		xPositionInZone++;
		robot.rotate(-90);
		tll.goBackwardAndAlign();
		tll.goToNextLine();
		yChecks --;
		yPositionInZone++;
		robot.rotate(90);
		tll.goBackwardAndAlign();
		robot.rotate(-90);
		objectDetector.rotateAndPoll(flagColor);
		if(objectDetector.getObject().equals(ObjectDetector.ObjectType.FLAG)){
			grabFlag();

		}
		else {
			while (xChecks !=0 || yChecks !=0){
				if(yChecks != 0){
					robot.setForwardSpeed(5);
					tll.goBackwardAndAlign();
					robot.rotate(90);
					navigation.goForwardWithoutPolling(3);
					tll.goBackwardAndAlign();
					robot.rotate(-90);
					tll.goToNextLine();
					yChecks --;
					yPositionInZone++;
					robot.rotate(90);
					tll.goBackwardAndAlign();
					robot.rotate(-90);
					objectDetector.rotateAndPoll(flagColor);
					if(objectDetector.getObject().equals(ObjectDetector.ObjectType.FLAG)){
						grabFlag();
						break;
					}
				}
				if(xChecks != 0){
					robot.setForwardSpeed(5);
					tll.goBackwardAndAlign();
					robot.rotate(90);
					navigation.goForwardWithoutPolling(3);
					tll.goBackwardAndAlign();
					tll.goToNextLine();
					robot.rotate(-90);
					navigation.goForwardWithoutPolling(3);
					tll.goBackwardAndAlign();
					xChecks --;
					xPositionInZone++;
					objectDetector.rotateAndPoll(flagColor);
					if(objectDetector.getObject().equals(ObjectDetector.ObjectType.FLAG)){
						grabFlag();
						robot.rotate(-90);
						break;

					}
				}
			}

			robot.setForwardSpeed(5);
			//navigation.goForwardWithoutPolling(3);
			tll.goBackwardAndAlign();
			robot.rotate(90);
			navigation.goForwardWithoutPolling(3);
			tll.goBackwardAndAlign();
			robot.rotate(90);
		}
	}