linked list conversion