added php/tools.php