begin refactor of message box code to create dialog boxes as well