updated genetic algorithm.