solve Problem 3