Add docstring here. I'm not sure what i0 and i1 are.