Code for Part 3 Finished.