extended to generate final snps