fixing crossover code