refactoring, animation engine update