add timer logic