Added solution to exercise 1.