added error dialog
codebase splitted