finished linked list merging problem