     // can be more than 1 command in a string, so I have to check again for a letter
     if ((tmp_str[i] >= 'A' && tmp_str[i] <= 'Z') || (tmp_str[i] >= 'a' && tmp_str[i] <= 'z')) {
 
-      if (tmp_str[i] == 'M' || tmp_str[i] == 'm') { // moves motor
-        if (tmp_str[i + 1] == 'S' || tmp_str[i + 1] == 's') { // stepper motor
-          int motor_index, num_steps;
-          int num_read = sscanf(tmp_str + i + 2, "%d%d", &motor_index, &num_steps);
-        //  Serial.print(motor_index);
-        //  Serial.write(' ');
-        //  Serial.println(num_steps);
-          if (num_read == 2) {
-            stepper_motors_controller.move_motor(motor_index, num_steps);
-            is_command_running = 1;
-            i += 5;
-          }
-          else
-            i++;// error on incomplete string (does nothing)
-        }
-        else if (tmp_str[i + 1] == 'D' || tmp_str[i + 1] == 'd') { // DC motor
-          int motor_index, num_miliseconds;
+		if (tmp_str[i] == 'S' || tmp_str[i] == 's') { // stepper motor
+			if (tmp_str[i + 1] == 'M' || tmp_str[i + 1] == 'm') { // move motor
+				int motor_index, num_steps;
+       int num_consumed;
+				int num_read = sscanf(tmp_str + i + 2, "%d%d%n", &motor_index, &num_steps, &num_consumed);
+				if (num_read == 2) {
+					stepper_motors_controller.move_motor(motor_index, num_steps);
+					is_command_running = 1;
+					i += 2 + num_consumed;
+				}
+				else
+					i++;// error on incomplete string (does nothing)
+			}
+			else
+			if (tmp_str[i + 1] == 'D' || tmp_str[i + 1] == 'd') { // disable motor
+				int motor_index;
+					sscanf(tmp_str + i + 2, "%d", &motor_index);
+					stepper_motors_controller.disable(motor_index);
+					sprintf(tmp_serial_out, "SD%d#", motor_index);
+					strcat(serial_out, tmp_serial_out);
+					i += 4;
+			}
+			// locks motor
+			else
+			if (tmp_str[i + 1] == 'L' || tmp_str[i + 1] == 'l') {
+				int motor_index;
+				sscanf(tmp_str + i + 2, "%d", &motor_index);
+				stepper_motors_controller.lock(motor_index);
+				sprintf(tmp_serial_out, "SL%d#", motor_index);
+				strcat(serial_out, tmp_serial_out);
+				i += 4;
+			}
+     else
+        if (tmp_str[i + 1] == 'S' || tmp_str[i + 1] == 's') { // stepper motor speed and acceleration
+          int motor_index;
+          int motor_speed, motor_acceleration;
+          int num_consumed;
+          sscanf(tmp_str + i + 2, "%d%d%d%n", &motor_index, &motor_speed, &motor_acceleration, &num_consumed);
+          stepper_motors_controller.set_speed_and_acceleration(motor_index, motor_speed, motor_acceleration);
+          i += 2 + num_consumed;
+        }
+			else
+				i++;
+			continue;
+		}
+
+        // dc motor
+		if (tmp_str[i + 1] == 'D' || tmp_str[i + 1] == 'd') { // DC motor
+			if (tmp_str[i + 1] == 'M' || tmp_str[i + 1] == 'm') { // stepper motor
+				int motor_index, num_miliseconds;
           int num_read = sscanf(tmp_str + i + 2, "%d%d", &motor_index, &num_miliseconds);
           if (num_read == 2) {
             dc_motors_controller_TB6612FNG.move_motor(motor_index, num_miliseconds);

void setup()
{
  first_start = 0;
  strcpy(firmware_version, "2016.07.16.0");

  current_buffer[0] = 0;


          else
            i++;// error on incomplete string (does nothing)
        }
			// disables motor
			else if (tmp_str[i + 1] == 'D' || tmp_str[i + 1] == 'd') { // disables DC motor
				int motor_index;
				sscanf(tmp_str + i + 2, "%d", &motor_index);
				dc_motors_controller_TB6612FNG.disable(motor_index);
				sprintf(tmp_serial_out, "DD%d#", motor_index);
				strcat(serial_out, tmp_serial_out);
				i += 4;
			}
		
        else
          i++; // incomplete string
        continue;
