change ArrayList to LinkedList