add exercise 3.21-3.24