Update ptfunctions.php