Merge and duplicates? method

Here is my modified code for the coding challenge.