updating code to find minimum set of haplotypes