Added "while" code.