The gene flow or genetic drift results in changed frequency of genes (or alleles) in both populations , causing variation , leading to evolution / speciation via founder effect .