Set iteration automatically