Implementing LinkedList methods