remove duplicates attempt 2