adding linked list code