Code for Part 2 Finished