Finish expandArrayList function