Update tools.class.php