Controlling loops with break and continue