added function to remove dups