this incrementation should be outside the `if ($n % 100 === 0) {` test, otherwise it will never be incremented