refactoring, diagrams