       digitalWrite(k4Pin, LOW);
       digitalWrite(k5Pin, LOW);
       digitalWrite(k6Pin, LOW);
-      digitalWrite(k7Pin, LOW);
-      digitalWrite(k8Pin, LOW);
+      //digitalWrite(k7Pin, LOW);
+      //digitalWrite(k8Pin, LOW);
       Serial.println("ALL ON");
-    delay(500);
-  });
-  server.on("/allOff", [](){
+
+      relayState = 1; //set state for screen update
+      
+    delay(100);
+  });
+  server.on("/allOff", [](){ //OFF
     server.send(200, "text/html", webPage);
     //Turn off RELAY
       digitalWrite(k1Pin, HIGH);

    Serial.println("RELAY 6 OFF");
    delay(500); 
  });
    //RELAY 7 ------------------------------------
    server.on("/relay7On", [](){
    server.send(200, "text/html", webPage);
    // Turn on RELAY
    digitalWrite(k7Pin, LOW);
    Serial.println("RELAY 7 ON");
    delay(500);
  });
  server.on("/relay7Off", [](){
    server.send(200, "text/html", webPage);
    //Turn off RELAY
    digitalWrite(k7Pin, HIGH);
    Serial.println("RELAY 7 OFF");
    delay(500); 
  });

    server.on("/relay8On", [](){
    server.send(200, "text/html", webPage);
    // Turn on RELAY
    //digitalWrite(k8Pin, LOW);
    Serial.println("RELAY 8 ON");
    delay(500);
  });
  server.on("/relay8Off", [](){
    server.send(200, "text/html", webPage);
    //Turn off RELAY
    //digitalWrite(k8Pin, HIGH);
    Serial.println("RELAY 8 OFF");
    delay(500); 
  });
  */
      //ALL RELAYS ------------------------------------
    server.on("/allOn", [](){ //ON
    server.send(200, "text/html", webPage);
    // Turn on RELAY
      digitalWrite(k1Pin, LOW);
