modify RRF.m