resolving divide by zero