change to C gain model and master.Rmd