Found a working method to pause and tightened the timing loop