Linked list code for week 2