optimizing transitions