Make genetic algorithm work