getting the animation transitions right