added timer update code