part of chapter 3 commit , but c301 example is not correct.  fix it later.