remove duplicates function added