Solve chapter 4