Lab2, Part2 - Final Code