 
 	// Only here temporarily for debugging
 	if (1) {
-		Serial.print(startTime); Serial.print(" "); Serial.print(elapsedTime); Serial.print(" ");
+		Serial.print(startTime); Serial.print(" "); Serial.println(elapsedTime);
 	}
  
 	while (1) {

				elapsedTime = calcTime(startTime);

				// Any valid accumulated time will be returned
				if (startTime > 0 && elapsedTime > freeTime) {
          			return elapsedTime;
				}
				else {

		}
		// if periodX and periodY IS NOT a valid pair
		if ( signals[i] == 0 ) {
			numValid = 0;
			numInvalid += 1;
			// check if enough negative signals have been detected
			// calculate elapsed time
			if (numInvalid == sampleSize) {
				elapsedTime = calcTime(startTime);

				// if a job was detected, return
				if ((startTime > 0) && (freeTime < elapsedTime) && (elapsedTime < 5*quota)) {
					return elapsedTime;
				}
				else {
