arrayList modified using iterator