sadly it's needed, as we modify `result` in line 91