HW2 Final Version