clean up phenotype sort