added error check and dialog for division by zero
added dialog boxes for any division by zero