events added to pause or resume the animation