Finished Problem 31