chapter2 example