Updated tps.php by removing the need for local functions to print the data