practice code for http://shop.oreilly.com/product/0636920024606.do