correct when i = j