each method for the linked list