Added problem 6 solution in chapter 4