halfway through Problem 3