added variable, variable test while loop, and if conditional

added variable, variable test while loop, and if conditional