modification for div by zero case