Finish HW2 ridge function