use handler instead of timer to improve performance