how to implement crossover in genetic algorithm