should'nt it be k_i,x_i instead of k_i,r_i??