removeDuplicates fixed