Final part of Problem 2