Adding some code for LinkedList