   }
 
   if (digitalRead(SYSTEM_ON) == IS_ON) {
-      if (digitalRead(PUSHLOCK) == LOCKED) {
-        send_shutdown();
-        return server_shutdown;
-      } else {
-        if (receivedHeartbeat > 0) {
-          return server_running;
-        }
+    
+    if (digitalRead(PUSHLOCK) == LOCKED) {
+      send_shutdown();
+      return server_shutdown;
+    } else {
+      if (receivedHeartbeat > 0) {
+        return server_running;
       }
-  } else {
+    }
+
+
     if (digitalRead(BUTTON) == PUSHED) {
       delay(100);
-      //return system_reset;
-    }
-
+      //print mail or sth. else
+    }
+      
+  } else {
+    
     if (digitalRead(PUSHLOCK) == LOCKED) {
       return server_locked;
     } else {

    track_uart = millis();
  }

  if (digitalRead(SYSTEM_ON) == IS_ON) {
    return system_shutdown;
  } else {
    if (digitalRead(PUSHLOCK) == LOCKED) {

    if (receivedHeartbeat == HEARTBEAT_ABORT_ACK) {
      send_ok();
      return server_running;
    }

  } else {
    if (get_last_heartbeat() > HEARTBEAT_TIMEOUT) {
      if (digitalRead(PUSHLOCK) == LOCKED) {
        return server_locked;
      } else {
        return server_bootable;
      }
    }
  }
  
  return server_shutdown_active;
}

void *server_hungup() {
