Changed first array to arrayList

for dynamic sizing abilities