fixed the union so that it has no duplicates