removed while loop in newGeneration