added regularization term