   
     digitalWrite(Y_DIR_PIN, yDir > 0);
 
-    if (requestedR > currentR)
-    {
-      if ((requestedR - currentR) <= (UPPERBOUND_R/2))  rDir  = 1;
-      else rDir = -1;
-    }
-    else
-    {
-      if ((currentR - requestedR) <= (UPPERBOUND_R/2))  rDir  = -1;
-      else rDir = 1;
-    }
-
+    if (requestedR > currentR)  rDir = 1;
+    else  rDir = -1;
+    
     digitalWrite(R_DIR_PIN, rDir > 0);
 
     while(requestedX-currentX != 0 || requestedY-currentY != 0 || requestedR-currentR != 0)

      {
        digitalWrite(R_STEP_PIN, LOW);
        currentR += rDir;
        currentR = (currentR + UPPERBOUND_R) % UPPERBOUND_R; //Since 0 == UPPERBOUND_R
      }
    
      if(abs(currentX-requestedX) < SLOWSTEP) delayMicroseconds(MICRODELAY*(abs(currentX-requestedX)*((1.0-2.0)/SLOWSTEP)+SLOWRATE));
      else if(speedUp < SLOWSTEP) delayMicroseconds(MICRODELAY*(speedUp*((1.0-2.0)/SLOWSTEP)+SLOWRATE));
      else delayMicroseconds(MICRODELAY);


  delay(250);
  if(currentX < UPPERBOUND_X / 2) requestedX = 0;
  else requestedX = UPPERBOUND_X - 1;
  if(currentY < UPPERBOUND_Y / 2) requestedY = 0;
  else requestedY = UPPERBOUND_Y - 1;
  requestedR = 0;
  MoveXYR();  
  
}
