Loop with simple equivalent test