   boolean weHaveATag = false;              // is set to true if a tag is present and false, if not
   boolean loopWarningMessageNoAlbumInfos = true;  // make sure we get the "no album info on tag" message at least once
   boolean loopWarningMessageNoFilesInDir = true;  // make sure we get the "no files in dir" message at least once
+
+  // this allows for the pause/resume button to be pressed without a tag being present
+  // in this case the last played album is resumed
+  #ifdef RESUMELAST
+    #ifdef BUTTONS
+      btnVal = analogRead(btnLinePin);
+      if (btnVal > minBtnValue && (millis()-btnPressTime) > btnPressDelay) { 
+        if ( ((btnVal - btnValDrift) < btnPauseValue) && ((btnVal + btnValDrift) > btnPauseValue) ) { 
+          #ifdef DEBUG
+            Serial.println(F("Pause Button Pressed"));
+          #endif
+        }
+      }
+    #endif
+  #endif
   
   #ifdef DEBUG 
     Serial.print(F("."));

    //         0  success - the file was played
    //     1-127  any positive number for the next track to play
    //            from an album standpoint this can also be a previous track on the album to play next
    playTrack(curTrack, numberOfFiles);
    if (nextTrackToPlay == -1) {
      issueWarning("playback failed", "/system00/playfail.mp3", false);
      break;
    //} else if (nextTrackToPlay == 0) {
    //  return(0);
    } else if (nextTrackToPlay == 1) {
      curTrack = 1;
    } else {

static boolean getDirAndTrackToPlay(boolean);  // retrieve the directory and track number either from the Tag (true) or from last played session file (false)
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 and return 0
static void plrTogglePause(void);       // pause and unpause the player and return 0
static char playAlbum(byte);            // plays the album from plrCurrentFolder: returns -1 for error or a higher 
static char playTrack(byte);            // plays a track as defined by the global vars: returns -1 for error, 0 for success and track number to play next


// 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 byte 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
  static void switchLightState(void);   // 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()
#endif

//
//       SSSSSS  EEEEEE  TTTTTTTT  UU   UU   PPPPP
