adding R code and PNG output