added some functions to function.php