Why isn't the value of this dictionary just `$i`?