   motor3.run(BACKWARD);
   motor4.run(FORWARD);
 
-  delay(250);
-
-  turnMotorsOff();
+  delay(100);
+
+  motorSpeed = currentMotorSpeed;
+
+  if (isMovingForward) {
+    forward(0);
+  } else if (isMovingBackward) {
+    backward(0); 
+  } else {
+    turnMotorsOff();
+  }
 
   return "ok";
 }

  return "ok";
}

String backward(int argument)
{
  turnMotorsOn();
  
  motor1.run(FORWARD);

  motor3.run(FORWARD);
  motor4.run(BACKWARD);

  delay(100);

  motorSpeed = currentMotorSpeed;
  
  if (isMovingForward) {
    forward(0);
  } else if (isMovingBackward) {
    backward(0); 
  } else {
    turnMotorsOff();
  }

  return "ok";
}

String right(int speedInPercentage)
{
  int currentMotorSpeed = motorSpeed;
  setMotorSpeed(100);
  
  turnMotorsOn();

  motor1.run(BACKWARD);
