- refactor animation handling to its separate class