refactor class diagram