added divide by zero error