optimization using genetic algorithm