refactoring code, prepare to room functions, new dialogs