use for-each loop