Added handling of duplicate lists
merge