optimize- remove duplicates