using "while" in the setup