updated version of do_while.php