   //G01 defines relative movement
 
   else if (tempString.startsWith("G01")) {
-    Serial.println("G01 Received");
+    mySerial.println("G01 Received");
     String commandString = tempString; //make a copy of the command
 
     if(checkCommand(tempString)) {
       commandString.replace("G01,", ""); //remove the header part
 
-      //Serial.println("Modified String : " + commandString);
+      //mySerial.println("Modified String : " + commandString);
       String xSubString = commandString.substring(0, commandString.indexOf(',')); //extract the X part of the string
-      //Serial.println(xSubString);
+      //mySerial.println(xSubString);
       xSubString.replace("X", ""); //remove X to make integer string
       int xValue = xSubString.toInt(); //convert the integer string to int
 
       xSubString = commandString.substring(0, commandString.indexOf(',') + 1); //extract the X part of the string
       commandString.replace(xSubString, ""); //remove the X part
       String ySubString = commandString.substring(0, commandString.indexOf(',')); //extract the Y part of the string
-      //Serial.println(ySubString);
+      //mySerial.println(ySubString);
       ySubString.replace("Y", ""); //remove Y to make integer string
       int yValue = ySubString.toInt(); //convert the integer string to int
 

      ySubString = commandString.substring(0, commandString.indexOf(',') + 1); //extract the Y part of the string
      commandString.replace(ySubString, ""); //remove the Y part
      String zSubString = commandString;
      //Serial.println(zSubString);
      zSubString.replace("Z", ""); //remove Z to make integer string
      int zValue = zSubString.toInt(); //convert the integer string to int

      Serial.print("X = ");
      Serial.print(xValue);
      Serial.print(", ");
      Serial.print("Y = ");
      Serial.print(yValue);
      Serial.print(", ");
      Serial.print("Z = ");
      Serial.println(zValue);
      Serial.println();

      if(zValue == 1) { //if the command is to move pen down
        if(!isPenDown) { //if pen is not already down
          delay(100);
          if(movePen(DOWN)) { //try to move the pen
            Serial.println("Pen is down");
            delay(100); //relaxation time
          }
          else { //if couldn't move the pen
            Serial.println("Couldn't move the pen down!");
          }
        }
        else { //if pen is already down
          Serial.println("Pen is already down");
        }
      }


  int targetStepsY = 0;

  if(coordType.equals(PIXELS)) {
    targetStepsX = convertToStepsX(targetCoordX); //pixels need to be converted to steps
    targetStepsY = convertToStepsY(targetCoordY);
  }
  else if(coordType.equals(STEPS)) {
    targetStepsX = targetCoordX; //steps only need assignments
    targetStepsY = targetCoordY;
  }

  if ((targetStepsX <= stepBoundX) && (targetStepsY <= stepBoundY)) { //tarhet coordinates must be within bounds
    if ((targetStepsX != stepCountX) || (targetStepsY != stepCountY)) {
      int relTargetStepsX, relTargetStepsY;

      //relative target is calculated from where the plotter head is right now
      relTargetStepsX = targetStepsX - stepCountX; //calculate the relative target
      relTargetStepsY = targetStepsY - stepCountY; //by subtracting from current XY

      digitalWrite(enableX, HIGH); //enable the motors
      digitalWrite(enableY, HIGH);

      //uses pseudo simultaneous stepper driving
      while (!isCompleted) { //loop each step until completion
        if ((relTargetStepsX > 0) && (stepCountX != targetStepsX)) { //positive X movement (further from origin)
          stepperX.step(singleStepX); //perform a single step movement
