New population generation function added