initial version of genetic algorithm.