Implement Listing 13.21