                         Serial.write("err unknown config\n");
                 }
                 break;
-            case 's': // status
+            case '?': // get config/status
                 while (!Serial.available());
                 switch (arg = Serial.read()) {
                     case '0': // check if reference point exists

    if (Serial.available()) {
        char axis = Serial.read();
        switch (axis) {
            case 'r': // reset
                if (configured) {
                    motorX.rotateSteps(-posX);
                    motorY.rotateSteps(posY);
                    motorZ.rotateSteps(-posZ);
                    Serial.write("ok. done\n");
                } else {
                    Serial.write("err not configured\n");
                }
            case 'c': // config
                while (!Serial.available());
                switch (arg = Serial.read()) {
                    case '0': // set reference point
                        configured = true;
                        posX = posY = posZ = 0;
                        Serial.write("OK.\n");
                        break;
                    case '!': // unset reference point
                        configured = false;

    int steps = Serial.parseInt();
    pos += steps;
    motor.rotateSteps(steps);
    succes();
}

void writePos(char name, int var) {
    if (configured) {
        Serial.write("set pos.");
        Serial.write(name);
        Serial.write(' ');
        Serial.print(var);
        Serial.write('\n');
    } else {
        Serial.write("err not configured\n");
    }
}

void succes() {
    Serial.write("ok.\n");
}

void loop() {
