reuse function provided in util.php