second program in chapter 1