Setting values to iterate properly with minimal extra code