   
   // Update the recorded motor positions
   for (int i = 0; i < ROTARY_COUNT; i++) {
-    positions[i] += (int8_t) Wire.read();  // Must cast to signed 8-bit type
+
+    // another integer array OU (over/uder 0-30000)
+    if(positions[i] > 30000){
+      int temp = positions[i];
+      int remendier = temp - 30000;
+      positions[i] = remendier;
+      UO[i] += 1;      
+    }
+
+    if(positions[i] < -30000 && positions[i] < 0){
+      int temp = positions[i];
+      int remendier = temp + 30000;
+      positions[i] = remendier;
+      UO[i] -= 1;
+    }
+    
+    int r = (int) ((int8_t) Wire.read());  // Must cast to signed 8-bit type
+    positions[i] += (r*-1);
+    rotations[i] = (r*-1);
+
+    
   }
 }
 

  // Change this if 1st or 2nd bit is relevant, etc.
  for (int i = 1; i <= 250; i++) {
      Wire.beginTransmission(register_address); // open I2C communication to intended receiver
      Wire.setclock(freq);
      Wire.write( (byte) (file.charAt(i)) );   // sends the string (which is the file contents)
      Wire.endTransmission(); // end I2C communcation.
  }  
}


  //motorStop(0); // this might be useful, in the case the robot is already in a turning move
  
  motorBackward(FRONT_LEFT_MOTOR,power-2); // left motor is more powerful than right. This will make sure they have the same roatations +- 1 
                                          // could be more acurate if we use 0-255 instead of 0-100 for power rating.
  motorBackward(FRONT_RIGHT_MOTOR,power);

  // need to create a reply message to let the PC acknowledge the accepted request and execution
  Serial.println("Robot forward");
