first commit R code finished