Added solution for exercise 5 in chapter 1