added transition to animation for smoothness