add modified PHRETS.php