implimented evolvePopulation fuction