updated to get rid of duplicates