added timer to tick functions