properly handle possible divide by zero errors