Problem 7: Use problem 3's method here too.