moved .R file to code folder