Client code for chapter 7