fixed bug in ArrayList instatiation