adding the animation of the bar (not all fixed yet)