Added solution to exercise 5