added I/O functionality; reads to arrayList