Set context of loop.