custom animation to deal with transparency