enhanced for XCode buidl
Replaced iterator loops by auto loops