Listing 7.14, 7.15, 7.17