Done exercise 2.17
Done exercise 2.18