more trying to get chapter 4 code to work...