optimizing transitions and animations