Added more comments in the .R file