slight optimization for list_merge