 			// so, if lastPeriodX and lastPeriodY WAS a valid pair
 			/*if ( inRange(lastPeriodX, lastPeriodY) ) {
 				// check if the job was more than 5 seconds
-				if (pulseCount > minCount) {
+				if (pulseCount > freeTime) {
 					// calculate elapsed time in seconds
 					return calculateTime(startTime);
 				}

			// check if enough negative signals have been detected
			if (checkHistory(signals) == flag.detectedJobEnd) {
				elapsedTime = calculateTime(startTime);
				if (startTime > 0 && elapsedTime > minCount) {
					return elapsedTime;
				}
				else {

/*
	This function monitors the motor driver signals on the laser cutter.
	The signals are PWMs of a specific frequency. This function measures the
	period of any signal detected and accumulates time when valid signals
	are detected. A polling subroutine continuously checks if an RFID tag is 
	still present.
	
