Added a timer to smooth the animation