finished the base of index.php