Solved design problem 7