continue refactor animation code