more changes to rf.R