final HW2 version