more refactoring of pdbinsert