changed LinkedList functionality