DB.php improved