Updated for Part2 of HW4