Move iteration logic