Adjusting case on output
Avoiding division by zero