implementing genetic algorithm