solved Problem 2