[PD] Refactoring a PD patch