implemented pgpe