Added Part2 of HW3.