fixed the switch project, refactoring completed
- need a better way to handle alert dialog in alertdialoghandler