function.php revised