move additional functions to util.php