added previous work from chap1 to chap5