     byte host[4];
     char *p = strtok(inputBytes, ".");  
     for (int i = 0; i < 4; i++) {
-        host[i] = atoi(p);
-        p = strtok(NULL, ".");
+      host[i] = atoi(p);
+      p = strtok(NULL, ".");
     }
     IPAddress hostIP = IPAddress(host);
     DBG Serial.print("New host ip address: ");

    if (value > 0) {
      settings.period = value;
    }
  } else if (cmd == 'A') {
    int value = atoi(inputBytesPtr);
    if (value >= 0) {
      settings.r1 = value;
    }
  } else if (cmd == 'B') {
    int value = atoi(inputBytesPtr);
    if (value >= 0) {
      settings.r2 = value;
    }
  } else if (cmd == 'C') {
    int value = atoi(inputBytesPtr);
    if (value >= 0) {
      settings.offset = value;
    }
  } else if (cmd == 'D') {
    int value = atoi(inputBytesPtr);
    if (value >= 0) {
      settings.sensitivity = value;
    }
  } else if (cmd == 'K') {
    strncpy(settings.apikey, inputBytes,49);
    settings.apikey[48] = '\0';
  }

  else {
    // if you couldn't make a connection:
    DBG Serial.println("Unable to connect.");
  }
  lastConnectionTime = millis();
}
