rearranged .R files