Add ex2.R, the mainfile