mitchell's code for index.php