separated the genetic algorithm