pmscript for foundation pmhandler