updated the RSF code