added var to check if the timer is running.