Added regularization.