finished version 1 of for.php