Exchanged for-each with vanilla for-loop