exercises 5.21 and 5.22