First commit of the script to correct PD using SR