made a timer with if statements