separate out pdmat part to PDMats package