more functions in index.php