Works for case where i1 = j1