changed to using arrayLists added sub transactions