Added solution to Problem 9