   }
 
   while(rightUltrasonic.getDistance() > closeToWall){   //roll forward until the first room is encountered, then kick out of function
-    moveForward();
+    rollForward();
   }
 }
 

     }
    
    if (frontLeftUltrasonic.getDistance() > 3) {
      moveForward();
    } else {
      stopRobot();
      delay(500);

unsigned long freqCount;
double closeToWall = 2;   //defines how close the robot should be (inches) to the wall to register as being "too close"

void rollForward() {
  leftServo.write(180);
  rightServo.write(0);
}

void rollBackward() {
  leftServo.write(0);
  rightServo.write(180);
}
