updated animation-smoother version