Made the animation function take multiple amounts of animation