regularization. debug done