add pdmat (tested)