min_genome function