Add the animation function