beginning of linked list code