restructuring the index.php