fixed R file