refactor animation logic
init tmp