   if (contentSize < bufferSize) {
     bufferSize = contentSize;
   }
-  for (byte i = 0; i < bufferSize; i++) {
-    buffer[i] = newContent[i];
-  }
+  memcpy(buffer, newContent, bufferSize * sizeof(byte) );
 
   // Write block
   Serial.print(F("Writing data to block: ")); Serial.println(newContent);
-  status = (MFRC522::StatusCode) mfrc522.MIFARE_Write(absoluteBlock, buffer, 16);
+  status = mfrc522.MIFARE_Write(absoluteBlock, buffer, 16);
   if (status != MFRC522::STATUS_OK) {
     Serial.print(F("MIFARE_Write() failed: "));
     Serial.println(mfrc522.GetStatusCodeName(status));

    return;
  } else if (server.method() == HTTP_POST) {
    if (server.hasArg("newFolder")) {
      Serial.print(F("Creating folder"));
      Serial.print(F(" "));
      Serial.println(server.arg("newFolder"));
      stopMp3();
      yield();

  Serial.println(mfrc522.PICC_GetTypeName(piccType));

  // Check for compatibility
  if (piccType != MFRC522::PICC_TYPE_MIFARE_1K ) {
    Serial.println(F("Unsupported card."));
    return;
  }
