added regularization