regularize before invert
add svd
make some commands a function