         CAN.readMsgBufID(&id, &dlc, data);    // read data,  len: data length, buf: data buf        
         Serial.println("\n------------------------------\n");
 
-        // Display the message
-        PrintMessage(); 
+        // Increment counter (invalid messages are still received, so count them too)
+        numReceived++;
 
         // Authenticate the message
         if (Authenticate())
         {
+          // Display the message
+          PrintMessage(); 
+          
           Serial.println("\tAuth Good");
           TakeAction();     // only respond to authorized messages
         }
-        else
-          Serial.println("\tFAILED AUTH");
     }
 }
 

    uint8_t key[100] = {0}; // buffer for the key
    uint8_t keyLen;
    GetKey(id, &key[0], keyLen);
    for(int i = 0; i < keyLen; i++)
    {
        Serial.print(key[i]);
        Serial.print(".");
    }
    Serial.println();


const int HASH_LEN = 20; // 160-bit hash
uint8_t correct_hash[HASH_LEN];
uint8_t incoming_hash[HASH_LEN];

// For data collection - quantity of messages received
long long int numReceived = 0;

void setup()
{
