code wrote before
add chapter 4