Add option to stop the animation once completed