simple loop extraction. doesn't properly handle multi-level continues