linked list passed