simple population script slightly improved