Update week2.r