add timer code