minor change in computation of r_nx for N_file