animation adapted to refactoring