code to make PD only get called once until the problem is resolved