changed arraylist & linkedlist