implement crossover and mutation method