updated thread.php