             break; // for i
           }
         }
-        else
-          if (current_buffer[i] == 'D'){// Disables motor
-            // find the terminal character #
-            int j = i + 1;
-            for (; j < buffer_length && current_buffer[j] != '#'; j++);// parse until I find the termination char
-            if (j < buffer_length){
-              char tmp_str[64];
-              strncpy(tmp_str, current_buffer + i + 1, j - i - 1);
-              tmp_str[j - i - 1] = 0;
-              int motor_index;
-              sscanf(tmp_str, "%d", &motor_index);
-              disable_motor(motor_index);
-              // remove the current executed command
-              strcpy(current_buffer, current_buffer + j + 1);
-              break;
-            }
-            else{// the string is not completed ... so I must wait more...
-              break; // for i
-            }
-          }
-        else
-          if (current_buffer[i] == 'L'){// locks motor
-            // find the terminal character #
-            int j = i + 1;
-            for (; j < buffer_length && current_buffer[j] != '#'; j++);// parse until I find the termination char
-            if (j < buffer_length){
-              char tmp_str[64];
-              strncpy(tmp_str, current_buffer + i + 1, j - i - 1);
-              tmp_str[j - i - 1] = 0;
-              int motor_index;
-              sscanf(tmp_str, "%d", &motor_index);
-              lock_motor(motor_index);
-              // remove the current executed command
-              strcpy(current_buffer, current_buffer + j + 1);
-              break;
-            }
-            else{// the string is not completed ... so I must wait more...
-              break; // for i
-            }
-          }
     }
   }
   

                Serial.write("current command is=");
                Serial.write(tmp_str);
              #endif
              
              int motor_index, num_steps;
              sscanf(tmp_str, "%d%d", &motor_index, &num_steps);
              move_motor(motor_index, num_steps);
              is_command_running = 1;

              // remove the current executed command
              strcpy(current_buffer, current_buffer + j + 1);// not sure if this is good
              

      // parse from the beginning until I find a M, D, S or A
      int buffer_length = strlen(current_buffer);
      for (int i = 0; i < buffer_length; i++)
        if (current_buffer[i] >= 'A' && current_buffer[i] <= 'Z' || current_buffer[i] >= 'a' && current_buffer[i] <= 'z'){// a command
          // find the terminal character #
          int j = i + 1;
          for (; j < buffer_length && current_buffer[j] != '#'; j++);// parse until I find the termination char
