optimize to not divide by zero