Minor restructure of timer in rate function