revised code in light of duplicates revealed in SAUP data