break message box into separate class