add the CopyPPM function