add pddet & pdlogdet (tested)