improve implementation of the animation manager