Kevin Shih’s exercise 3.2