implement maxnorm regularization