regularization in constant time.
Beware: it's not pretty.