updated genetic algorithm