Find a better way to implement the animation