cleaned syntax of psd(). Now the same as in yao (this one has been ported to yao)