Replace with a regular loop