Made it possible to resimulate the population function using prepare().