restructuring of timer