exercises 3.21 and 22