Refactoring. New condition in WHILE.