adding animation to bars