   strcat(filename, "track");
   strcat(filename, curTrackCharNumber);
   strcat(filename, ".mp3");
-  
-  // return true or false for the filename created - this is checked
+}
+
+// return true or false for the filename created - this is checked
+static boolean checkIfFileExists(void){
   return (SD.exists(filename));
 }
-
 
 // store uid, plrCurrentFolder and firstTrackToPlay in the char array trackDbEntry[]
 // so we may write it to the track Db file
-#ifdef NFCTRACKDB
 static void setTrackDbEntry() {
-  char tmpbuf[4];                                 // temp buffer for one number of the uid
-    
-  // create the entry for the  "Tag UID <-> directory + track number"  connection
-  memset(trackDbEntry, 0, sizeof(trackDbEntry));
-  for (byte i = 0; i <= uidLength ; i++) {
-    sprintf( tmpbuf, "%d", uid[i] );              // print one byte of the uid as decimal into tmpbuf, so
-    strcat( charUid, tmpbuf );                    // we can add it to the charUid 
-  }
-  
-  memcpy(trackDbEntry, charUid, sizeof(charUid)); // finally we add the charUid to the trackDbENtry 
-  strcat(trackDbEntry, ":");                      // add a seperator :
-  strcat(trackDbEntry, plrCurrentFolder);         // the folder of the album this tag is connected with
-  char cstr[4];                                   // a new char array that will hold firstTrackToPlay as a char array
-  itoa(firstTrackToPlay, cstr, 10);               // converting firstTrackToPlay to char and place it in cstr
-  strcat(trackDbEntry, ":");                      // and the number of the track
-  strcat(trackDbEntry, cstr);                     // and the number of the track
-  strcat(trackDbEntry, "\n");                     // and a newline :-)
-}
-#endif
+  #ifdef NFCTRACKDB
+    char tmpbuf[4];                                 // temp buffer for one number of the uid
+      
+    // create the entry for the  "Tag UID <-> directory + track number"  connection
+    memset(trackDbEntry, 0, sizeof(trackDbEntry));
+    for (byte i = 0; i <= uidLength ; i++) {
+      sprintf( tmpbuf, "%d", uid[i] );              // print one byte of the uid as decimal into tmpbuf, so
+      strcat( charUid, tmpbuf );                    // we can add it to the charUid 
+    }
+    
+    memcpy(trackDbEntry, charUid, sizeof(charUid)); // finally we add the charUid to the trackDbENtry 
+    strcat(trackDbEntry, ":");                      // add a seperator :
+    strcat(trackDbEntry, plrCurrentFolder);         // the folder of the album this tag is connected with
+    char cstr[4];                                   // a new char array that will hold firstTrackToPlay as a char array
+    itoa(firstTrackToPlay, cstr, 10);               // converting firstTrackToPlay to char and place it in cstr
+    strcat(trackDbEntry, ":");                      // and the number of the track
+    strcat(trackDbEntry, cstr);                     // and the number of the track
+    strcat(trackDbEntry, "\n");                     // and a newline :-)
+  #endif
+}
+
 
 
 #ifdef RAMCHECK

//       PP        RR    RR  OO    OO     TT     OO    OO     TT        YY     PP        EE          SS
//       PP        RR    RR   OOOOOO      TT      OOOOOO      TT        YY     PP        EEEEEE  SSSSS
//
// these are the prototypes to retrieve and set directory and track to play - aka work on the tagdb
static boolean getDirAndTrackToPlay(boolean);  // retrieves the directory and track number 
static boolean writeTrackDbEntry(void);        // store Tag UID, plrCurrentFolder and firstTrackToPlay in the trackDb (files on SD)


// prototype for NFC check for tag presence
#ifdef NFCTRACKDB
  static boolean checkTag(void);        // check if the tag is still on the reader - returns true or falce
#endif

// prototype for volume control via potentiometer
#ifdef VOLUMEPOT
  static void plrAdjustVolume(void);    // function to check for changes on the volume control and adjust volume accrodingly
#endif


// these are the prototypes for the mp3 player controller
static void plrStop(void);              // stops the player
static void plrTogglePause(void);       // pause and unpause the player
static char playAlbum(uint8_t);         // plays the album from plrCurrentFolder: returns -1 for error or a higher 
                                        // calls playTrack to actually play a track and check if that was successful and which 
                                        // track number to play next
static char playTrack(uint8_t);         // plays a track as defined by the global var filename.
                                        // returns -1 for error, 0 for success and track number to play next
                                        // this can either be provided char+1 or char-1


// prototype for warning
static void issueWarning(const char[], const char[], boolean); // the new warning method


// these are the prototypes to work on files and general helpers
static uint8_t countFiles(File);        // return the number of files in a directory passed as a File descriptor


// helper functions to set global vars
static boolean setFileNameToPlay(byte); // sets filename of the track to play from global vars plrCurrentFolder and plrCurrentFile and returns true if it exists
static void setTrackDbEntry(void);


// these are the prototypes for the led
#ifdef OPRLIGHT
  // switch the boolean var lightOn from true to false and vice versa 
  // - in case light is lightOn is set to true, lightStartUpTime is set to millis()
  static void switchLightState(void);   
#endif




//  LLLLLL  EEEEEE  DDDDDD
//
// switches the value of lightOn between true and false - only needed in case there is a LED attached
static void switchLightState(void) {
  #ifdef OPRLIGHT
    if (!lightOn) {
      #ifdef DEBUG
        Serial.println(F("Switching light off -> ON"));
      #endif
      lightOn = true;
      #ifdef OPRLIGHTTIME
        lightStartUpTime = millis(); // also sets the lightStartUpTime
      #endif
    } else {
      #ifdef DEBUG
        Serial.println(F("Switching light on -> OFF"));
      #endif
      lightOn = false;
      digitalWrite(infoLedPin, LOW);   // also turns off the info led
    }
  #endif
}
