add pd_logdet (tested)