   }
 
   if ( subMsgReceived == HIGH ) {
-    subMills = millis() - startMills;
+    subMills = (millis() - startMills) - wifiMills ;
     if (DEBUG_PRINT) {
       Serial.print("sub received ---> ");
       Serial.println(subMills);

      }
    }

    if (DEBUG_PRINT) {
      wifiMills = millis() - startMills;
      Serial.println();
      Serial.print("===> WiFi connected : ");
      Serial.println(wifiMills);

    buttonpayload += ",\"subMills\":";
    buttonpayload += subMills ;
    buttonpayload += "}";
    
    if (DEBUG_PRINT) {
      Serial.print("status pub ---> ");
      Serial.println(millis() - startMills);
