pull code out of loops when they have a single break and it allows us to turn them into simpler do-whiles