restructure index.php