in class modification to linked list