change to java 7
update new way of iterating