Chaper 4 end corrections
chapter 5 , before refactor
end of chapter 5