Tweaked chapter 1.R