corrected error in initialising F_IN and R_IN