MINOR Replace control with loop