switch to labeled loops and breaks