Update week4.R