added a method to animate the progress