Changed tab to spaces
Added remove-duplicates()