Altered loop logic