Updated exercise in chapter 6