add exercise 3.31-3.32