integrated the timer