added crossover logic