combined rf .R files