Completed the timer functionality