extract natural loops & handle nested continues