small refactoring. Diagram modify