fixed arrayList code

Not sure if its really doing anything as of yet.