Listing 7.3 fixed