 long diversionCheckingStartTime;
 bool isDiversionCheckRunning;
 
+bool isFirstRun = true;
+
 
 #pragma region "Initialization"
 void setup()

		break;
	}

	// print position and outer sensor values over serial port
	Serial.print(position);
	Serial.print("  ");
	Serial.print(sensorValues[0]);
	Serial.print("  ");
	Serial.println(sensorValues[5]);

	drive();
}


		moveBothMotors(maxMotorSpeed, backward, maxMotorSpeed, forward);
		checkForNewLineOnSide(left);

		if (isFirstRun)
		{
			path[pathLength] = left;
			pathLength++;
			simplifyMaze();
		}
		else
		{
			pathPositionInLaterRun++;
		}
		break;

	case forward:
