solved Problem 9