done with R_ij