trying to get the animation to generate at hte right moment.