iterate correctly