refactored update2.php to doCheck.php