added first part of chapter 5
made changes according to feedback