now calculates R_f and I_f correctly