     while(!Serial);
 }
 
+void setPos(int & pos, Motor & motor) {
+    if (!configured) {
+        errConf();
+        return();
+    }
+    int to = Serial.parseInt();
+    motor.rotateSteps(to - pos);
+    pos = to;
+    succes();
+}
+
 void cmdMotor(int & pos, Motor & motor) {
     int steps = Serial.parseInt();
     pos += steps;

                    motorZ.rotateSteps(-posZ);
                    succes();
                } else {
                    Serial.write("err not configured\n");
                }
            case '!': // set config
                while (!Serial.available());

        Serial.print(var);
        Serial.write('\n');
    } else {
        errConf();
    }
}

void errConf() {
     Serial.write("err not configured\n");
}

void succes() {
