final animation logic