use view functions for index.php