added crossover function