Complete HW2, finally