Changed ArrayList to LinkedList