made LinkedList a prototype