Solved chapter 4, problem 1