Added printList function to LinkedList