hw2 update with regularization