pdb refactoring