 	path[pathLength + 1] = none;
 	pathPositionInLaterRun = 0;
 	isFirstRun = false;
-	if (path[pathPositionInLaterRun] == (unsigned char)3)
+	if (path[pathPositionInLaterRun] == backward)
 	{
 		direction = backward;
 		pathPositionInLaterRun++;

{
	// update position and sensorValues
	position = qtra.readLine(sensorValues);

	if (pathPositionInLaterRun > pathLength && !isFirstRun)
	{
		turnOffAllLeds();
		moveBothMotors(0, forward, 0, forward);
		exit(0);
	}

	// if the time for the last step before turn is over
	if (direction == diversionChecking

		bluetooth.print(myChar);
	}

	if (myChar == 9)
	{
		shutDown();
	}

	drive();
}

