test code to get rid of duplicates