changed for loop so I is an arrayList