added Pages value to thread.php