solved division by zero problem