added user defined num of populations, and num of iterations