add one-time loop when we need to handle control flow in outlined functions