working on Problem 3