Implementing LinkedList exercise