while loops for repeated failures