changed i4 to i6 to avoid overflow for very slow runs with full range-checking options