Fixed the return statement for the timer function