Debugged PDM.py