added Ex1.R