linked list insertion code completed