working on Problem 8