finish exercise 3.28 ~ 3.32, in section 3.3.4