exercises 2.17 and 18