fixing the population script