Implement exercises chapter 7