     digitalWrite(relayPins[thisPin], relayStates[thisPin]);
   }
 
-  digitalWrite(13, LOW);     
+  digitalWrite(13, LOW);
   delay(500);
   digitalWrite(13, HIGH);
   delay(500);
 
   Serial.begin(115200);
-  setup_ethernet();                   
+  setup_ethernet();
   client.setServer(server, 1883);
   client.setCallback(callback);
 }

  char* switchState = (char)payload[0];

  if (switchState == '2') {
    if (relayStates[posInArray] == HIGH){
      switchState = '1';
    }
    else {

    if (client.connect("RelayboardClient")) {
      Serial.println("connected");
      client.publish(outTopic, "RelayBoard booted");
      for (int thisPin = 0; thisPin < pinCount; thisPin++) {
        char* state = relayStates[thisPin] == HIGH ? "0" : "1";
        publishRelayState(thisPin + 1, state);
      }
      client.subscribe(inTopic);
    } else {
      Serial.print("failed, rc=");
