pausing and starting the animation