complete the R file