add third variable figures and update R code