updated version for new timer code