       }
 
       if (tmp_str[i] == 'G' || tmp_str[i] == 'g') { // for debugging purpose
-        if (tmp_str[i + 1] == 'S' || tmp_str[i + 1] == 's') { // gets stepper motor speed and acceleration
+        if (tmp_str[i + 1] == 'S' || tmp_str[i + 1] == 's') { // gets stepper motor speed and acceleration num sensors attached
           int motor_index;
-          byte num_sensors;
+          byte num_sensors_attached;
           float motor_speed, motor_acceleration;
           sscanf(tmp_str + i + 2, "%d", &motor_index);
           stepper_motors_controller.get_speed_and_acceleration(motor_index, &motor_speed, &motor_acceleration);
-          num_sensors = stepper_motors_controller.get_num_attached_sensors(motor_index);
-          sprintf(tmp_serial_out, "GS%d %d %d %d#", motor_index, (int)motor_speed, (int)motor_acceleration, num_sensors);
+          num_sensors_attached = stepper_motors_controller.get_num_attached_sensors(motor_index);
+          sprintf(tmp_serial_out, "GS%d %d %d %d#", motor_index, (int)motor_speed, (int)motor_acceleration, num_sensors_attached);
           strcat(serial_out, tmp_serial_out);
           i += 4;
         }

          strcat(serial_out, tmp_serial_out);
          i += 5;
        }
        else if (tmp_str[i + 1] == 'U' || tmp_str[i + 1] == 'u') { // get potentiometer min max home
          int ultrasound_index;
          byte trig_pin, echo_pin;
          sscanf(tmp_str + i + 2, "%d", &ultrasound_index);

          strcat(serial_out, tmp_serial_out);
          i += 4;
        }
        else if (tmp_str[i + 1] == 'P' || tmp_str[i + 1] == 'p') { // get potentiometer min max home dir
          int pot_index, pot_min, pot_max, pot_home, pot_dir;
          byte pot_pin;
          sscanf(tmp_str + i + 2, "%d", &pot_index);
