added functions.php, and some changes in index