Added crossover function