integrate Roger's modification on chapter 2
integrate new changes