Added solution to Exercise 4