 
 void loop() {
   // put your main code here, to run repeatedly:
-
+  
+  int mostRecentTurn = RIGHT;
+  int direction = LEFT;
+  
   if (button.isPressed())
   {
     // if button is pressed, stop and wait for another press to go again

  {
    // if leftmost sensor detects line, reverse and turn to the right
    turn(RIGHT, true);
  }
  else if (sensor_values[5] < QTR_THRESHOLD)
  {
    // if rightmost sensor detects line, reverse and turn to the left
    turn(LEFT, true);
  }
  else  // otherwise, go straight
  {

        motors.setSpeeds(FULL_SPEED, FULL_SPEED);
      }
      else {
        if (mostRecentTurn = LEFT) {
          direction = RIGHT;
        }
        else {
          direction = LEFT;
        }
        motors.setSpeeds(SPIN_SPEED * direction, -SPIN_SPEED * direction);
      }
    }
  }
