working diagram widget implementation in tmp project
refactoring