updated genotype script