 				soundFeedback(reject);
 				Serial.print(messages.cancel);
 				sendCount = (millis() - startTime)/1000;
-				while(1) {
-					if (sendCount > minCount) {
-						Serial.println(sendCount);
-					}
-          else {
-            Serial.println(0);
-          }
+				if (sendCount > minCount) {
+          return sendCount;
 				}
-				return sendCount;
+        else {
+				  return 0;
+        }
 			}
 		}
 		else {

					updateThingSpeak(sendCount);
					lastSend = millis();
					Serial.println("Done");
					return sendCount;
				}
				periodCount = 0;
			}

		// record the previous state
		lastPeriodX = periodX;
		lastPeriodY = periodY;
    
		delay(pollInterval);
	}
}
