Adding timer functions. need to add reset to the timer.