the timer logic was wrong