Added the animation code and the update circle function