Update of script from chapter 15 with a couple of pattern matches