tweak psd matrix operations