remove index.php and add functions to page.php