add code for regularization example