dialogs are implemented, need refactoring