refactor while condition